import { joinPath } from './path'

export function getEnvTitle() {
  return import.meta.env.VITE_APP_TITLE || import.meta.env.VITE_DEFAULT_APP_TITLE
}

export function isProduction() {
  return import.meta.env.VITE_HTTP_ENV === 'PROD'
}

export function isDevelopment() {
  return import.meta.env.VITE_HTTP_ENV === 'DEV'
}

export function isStaging() {
  return import.meta.env.VITE_HTTP_ENV === 'STAGING'
}

export function getFileUrl(url: string) {
  const basePath = import.meta.env.VITE_APP_BASE_PATH as string
  return joinPath(basePath, url)
}
